import http from './index'
const login = async (data) => {
  const res = await http.post(`/login`, data)
  localStorage.setItem('token', res.data.token)
  return res.data.token
}
const getInfo = async () => {
  const res = await http.get(`/getInfo`)
  return res.data
}
export { login, getInfo }
